<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>コントロールパネル</title>

    <link href="./assets/styles/default.css" rel="stylesheet" />
    <link href="./assets/styles/page/item_form.css" rel="stylesheet" />
	<script src="./assets/scripts/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
	<script src="./assets/scripts/import.js" type="text/javascript"></script>
	
	
	<script type="text/javascript">
		$(function(){
			back_to_search();
			categoryModal({url:"{{'Home/Category/index'|U}}?keepThis=true&parent=3&TB_iframe=true&height=500&width=300&modal=false",mode:"tree"});


			
			$('.free > p').click(function(){
				var t = $(' > div',$(this).parent());
				var h = t.height();

				if(t.is(":hidden")){
					$(this).addClass("active");
					$('em',this).text('j');
					t.css({"height":"0px"})
					.show()
					.animate({height:h+"px"},300,function(){
						$(this).css({height:""});
					});
				}else {
					$(this).removeClass("active");
					$('em',this).text('g');
					t.animate({height:"0px"},300,function(){
						t.hide().css({height:h+"px"},300)
					});
				}
			});

			$('.close > p').click();
			
			

		});
	</script>
</head>
<body>

{{$zhead}}

<div id="container">
	{{$zmenu}}

    <article>
    	<h2><span>&nbsp;</span>商品管理<p><a href="javascript:;">Open Plugins</a></p></h2>
        <nav>
        	<ul>
				<li class="active"><a href="{{'Home/Item/index'|U}}"><span>商品検索</span></a></li>
        <li><a href="{{'Home/Item/insert'|U}}"><span>商品登録</span></a></li>
        <li><a href="{{'Home/goodstop/index'}}"><span>ランキング</span></a></li>
        <li><a href="{{'Home/Item/set'|U}}"><span>基本設定</span></a></li>
			</ul>
        </nav>
		<section id="content">
			<h3>商品参照</h3>
			<p class="message">商品情報。</p>
			<form name="fm" action="{{'Home/Item/update'|U}}" method="post" >
				<h4><span>&nbsp;</span>基本情報</h4>
				<input type="hidden" name="method" value="update"/>
				<input type="hidden" name="id" value="{{$forms.id}}"/>
				<table class="formTable">
					<tbody>		
						<tr>
							<th>状態</th>
							<td>
							{{$forms.goods_status}}
							</td>
						</tr>
						<tr>
							<th>商品コード</th>
							<td>{{$forms.goods_id}}</td>
						</tr>
						<tr>
							<th>商品名</th>
							<td>{{$forms.goods_name}}</td>
						</tr>
						<tr>
							<th>商品種別</th>
							<td>
							{{$forms.goods_type}}	
							</td>
						</tr>
						<tr>
							<th>カテゴリ（複数）</th>
							<td>
							{{ foreach from=$categorys item=category }}
					   		{{$category.category_name}} &nbsp;&nbsp;
							{{ /foreach }}
							</td>
						</tr>
						<tr>
							<th>本体価格</th>
							<td>{{$forms.goods_unitprice}}円（税込み<span id="tax_in">{{$forms.tax}}</span>円）{{$err_mes.goods_unitprice}}</td>
						</tr>
						<tr>
							<th>在庫</th>
							<td>
								
								{{$forms.goods_stockstatus}}
								
							</td>
						</tr>
						<tr>
							<th>商品画像（複数）</th>
							<td>
							<div id="img" >
							
							{{ foreach from=$formsimg key=k item=v name="member" }}
								<div id="{{$k}}">
								<img width="240" src="{{$v.imgdir}}"><br>
								</div>
						    {{ /foreach }}	
							
							</div>
							<div style="clear:both"></div>
							</td>
						</tr>
						<tr>
							<th>発行月</th>
							<td>
							{{$forms.goods_issuedate}}
							</td>
						</tr>
						<tr>
							<th>仕様</th>
							<td>{{$forms.goods_style}}</td>
						</tr>
						<tr>
							<th>フラグ</th>
							<td>
								 {{ foreach from=$goods_mark key=kk item=vv name="member" }}
					   		     {{assign var="goods_mark" value= goods_mark$kk}}
							    <label><input type="checkbox" name="goods_mark{{$kk}}"  {{if $forms[$goods_mark] == $kk }} checked="true" {{/if}} value="{{$kk}}" />{{$vv}}</label>
						         {{ /foreach }}
							</td>
						</tr>
						<tr>
							<th>単位</th>
							<td>
								{{$forms.goods_unit}}
							</td>
						</tr>
						<tr>
							<th>キャッチコピー</th>
							<td>{{$forms.goods_slogan}}</td>
						</tr>
						<tr>
							<th>表示順</th>
							<td>{{$forms.goods_order}}</td>
						</tr>
						<tr>
							<th>META Description</th>
							<td>{{$forms.metadescription}}</td>
						</tr>
						<tr>
							<th>META Keyword</th>
							<td>{{$forms.metakeyword}}</td>
						</tr>
						<tr>
							<th>試し読みURL</th>
							<td>{{$forms.tryURL}}</td>
						</tr>
						<tr>
							<th>外部URL</th>
							<td>{{$forms.outsideURL}}</td>
						</tr>
						<tr>
							<th>社内コメント</th>
							<td>{{$forms.insideappraise}}</td>
						</tr>
						<tr>
							<th>販売開始日時</th>
							<td>{{$forms.sellbegin}}</td>
						</tr>
						<tr>
							<th>販売終了日時</th>
							<td>{{$forms.sellend}}</td>
						</tr>
					</tbody>
				</table>

				 <div class="free">
					<p>
						<em>j</em>
						フリースペース1 
					</p>
					<div>
						<table class="formTable">
							<tbody>
								<tr>
									<td>
										{{$forms.freespace1}}
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>

				 <div class="free ">
					<p>
						<em>j</em>
						フリースペース2
					</p>
					<div>
						<table class="formTable">
							<tbody>
								<tr>
									<td>
										{{$forms.freespace2}}
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>

				 <div class="free ">
					<p>
						<em>j</em>
						フリースペース3
					</p>
					<div>
						<table class="formTable">
							<tbody>
								<tr>
									<td>
										{{$forms.freespace3}}
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>

				<p class="button">
					<!--<button type="button" id="btn_update" class="submit"><span>更新</span></button>-->
				</p>
			</form>
		</section>
	</article>
</div>

	
	
{{$zfooter}}
</body>
</html>